package com.ls.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ls.entity.Province;
import com.ls.mapper.ProvinceMapper;
import com.ls.service.IProvinceService;
import com.ls.utils.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  省份相关接口
 * </p>
 *
 * @author pengyu
 * @since 2020-05-25
 */

@RestController
@RequestMapping("/province")
public class ProvinceController {

    @Autowired
    IProvinceService service;

    @Autowired
    ProvinceMapper mapper;

    /** 查询全部省份 接口  */
    @GetMapping(value = "getAll")
    public ResultData<Province> getAll() {
        return ResultData.successData(service.list(new QueryWrapper<>()));
//        return  ResultData.successData(mapper.selectList(new QueryWrapper<>()));
    }



}

